package cn.tedu._04mybatis.mapper;

import cn.tedu._04mybatis.pojo.entity.Comment;
import cn.tedu._04mybatis.pojo.vo.CommentVo3;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface CommentMapper {
    @Insert("INSERT INTO comment (content,created,user_id ,weibo_id ) " +
            "VALUES (#{content},#{created},#{userId},#{weiboId})")
    int insertComment(Comment comment);


    @Delete("DELETE FROM comment WHERE id =#{id} ")
    int deleteComment(long id);

    //@Update("UPDATE comment SET created = #{created} WHERE i")

    CommentVo3 selectComment(Integer id);

}
